package com.aier.common.common;

import java.util.ResourceBundle;

import cn.emay.sdk.client.api.Client;

public class MessageSingletonClient2 {
    private static Client client;
    private MessageSingletonClient2(){
    }
    public static synchronized Client getClient(String softwareSerialNo,String key){
        if(client==null){
            try {
                client=new Client(softwareSerialNo,key);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return client;
    }
    public static synchronized Client getClient(){
        ResourceBundle bundle=ResourceBundle.getBundle("config");
        if(client==null){
            try {
                client=new Client(bundle.getString("softwareSerialNo2"),bundle.getString("key2"));
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return client;
    }
    
    
}
